<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>冒泡事件</title>
    <style>
    table{
        border:1px solid lightblue;
    }
      td{
        border:1px solid lightblue;
      }
    </style>
</head>

<body>
     <table id="myTable">
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
         <tr>
             <td>text1</td>
             <td>text2</td>
             <td>text3</td>
             <td>text4</td>
             <td>text5</td>
             <td>text6</td>
             <td>text7</td>
             <td>text8</td>
             <td>text9</td>
             <td>text10</td>
         </tr>
     </table>
     <script>
       var x = document.getElementById('myTable');
         x.onclick = function(w){
            console.log(w.target.innerHTML);

        }
       

     </script>
     </body>    
</html>